﻿@using Yelper.Web.Models
@model ChangePasswordModel

@{
    ViewBag.Title = "Change password";
}

<h1>Change password</h1>

@if (null != ViewData["success"] && (bool)ViewData["success"]) { 
<div class="success">Your new password was saved.</div>
}

@using (Html.BeginForm()) {

    <div class="FormItem">
        <div class="FieldInfo">
            @Html.LabelFor(x => x.Password)
        </div>
        <div class="Field">
            @Html.PasswordFor(x => x.Password)
            @Html.ValidationMessageFor(x => x.Password)
        </div>
    </div>
    
    <div class="FormItem">
        <div class="FieldInfo">
            @Html.LabelFor(x => x.NewPassword)
        </div>
        <div class="Field">
            @Html.PasswordFor(x => x.NewPassword)
            @Html.ValidationMessageFor(x => x.NewPassword)
        </div>
    </div>
    
    <div class="FormItem">
        <div class="FieldInfo">
            @Html.LabelFor(x => x.ConfirmNewPassword)
        </div>
        <div class="Field">
            @Html.PasswordFor(x => x.ConfirmNewPassword)
            @Html.ValidationMessageFor(x => x.ConfirmNewPassword)
        </div>    
    </div>
  
    <div class="FormButton">
        <input type="submit" value="Change my password" />
    </div>

}

@section right {
    <h1>Actions</h1>
    @Html.ActionLink("Edit profile", "Profile")
}